//
//  Model.swift
//  Sorts
//
//  Created by lhc on 2023/12/8.
//

import SwiftUI

@Observable
class NumberModel: Identifiable {
    enum type {
        case selected
        case normal
    }
    
    var id = UUID()
    var num = 0
    var t: type = .normal
    
    init(num: Int = 0) {
        self.num = num
    }
    
    var firstColor: Color {
        switch t {
        case .selected:
            return .second
        case .normal:
            return .first
        }
    }
    
    var secondColor: Color {
        switch t {
        case .selected:
            return .first
        case .normal:
            return .second
        }
    }
}
